package com.ruoyi.SSL.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 证书域名管理对象 ssl_domain
 *
 * @author ruoyi
 * @date 2024-10-12
 */
public class SslDomain extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** Id */
    private Long id;
    //所属服务器信息  可能为空
    private String stsId;
    private String serIp;
    private String stsName;
    //关联的证书申请记录
    private Long sslApplyId;
    //是否自动续签证书
    private String isAutoSsl;
    //是否已验证过域名所有权
    private String isYzOver;
    private String whereSql;
    /** 是否是泛域名 */
    @Excel(name = "是否是泛域名")
    private String isUniversal;

    /** 颁发机构 */
    @Excel(name = "颁发机构")
    private String issuingAuthority;

    /** 证书域名 */
    @Excel(name = "证书域名")
    private String certificateDomain;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiredTime;

    private Date sslCreateTime;

    //证书到期时间
    private Integer daysDifference;

    //续签到期时间
    private Integer autoDaysDifference;

    /** 状态（待验证域名所有权，颁发中、已颁发） */
    @Excel(name = "状态", readConverterExp = "待=验证域名所有权，颁发中、已颁发")
    private String status;

    private String enableStatus;

    //部署状态
    private String deployStatus;

    private String privateKeyType;

    private String rrVal;   // 需要解析的CNAME的记录值

    private String sslAuthInfo;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date autoExpiredTime;

    public Date getSslCreateTime() {
        return sslCreateTime;
    }

    public void setSslCreateTime(Date sslCreateTime) {
        this.sslCreateTime = sslCreateTime;
    }

    public String getEnableStatus() {
        return enableStatus;
    }

    public void setEnableStatus(String enableStatus) {
        this.enableStatus = enableStatus;
    }

    public String getSerIp() {
        return serIp;
    }

    public void setSerIp(String serIp) {
        this.serIp = serIp;
    }

    public Integer getAutoDaysDifference() {
        return autoDaysDifference;
    }

    public void setAutoDaysDifference(Integer autoDaysDifference) {
        this.autoDaysDifference = autoDaysDifference;
    }

    public Date getAutoExpiredTime() {
        return autoExpiredTime;
    }

    public void setAutoExpiredTime(Date autoExpiredTime) {
        this.autoExpiredTime = autoExpiredTime;
    }

    public String getSslAuthInfo() {
        return sslAuthInfo;
    }

    public void setSslAuthInfo(String sslAuthInfo) {
        this.sslAuthInfo = sslAuthInfo;
    }

    public String getRrVal() {
        return rrVal;
    }

    public void setRrVal(String rrVal) {
        this.rrVal = rrVal;
    }

    public String getWhereSql() {
        return whereSql;
    }

    public void setWhereSql(String whereSql) {
        this.whereSql = whereSql;
    }

    public String getPrivateKeyType() {
        return privateKeyType;
    }

    public void setPrivateKeyType(String privateKeyType) {
        this.privateKeyType = privateKeyType;
    }

    public Integer getDaysDifference() {
        return daysDifference;
    }

    public void setDaysDifference(Integer daysDifference) {
        this.daysDifference = daysDifference;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setIsUniversal(String isUniversal)
    {
        this.isUniversal = isUniversal;
    }

    public String getIsUniversal()
    {
        return isUniversal;
    }

    public void setIssuingAuthority(String issuingAuthority)
    {
        this.issuingAuthority = issuingAuthority;
    }

    public String getIssuingAuthority()
    {
        return issuingAuthority;
    }

    public void setCertificateDomain(String certificateDomain)
    {
        this.certificateDomain = certificateDomain;
    }

    public String getCertificateDomain()
    {
        return certificateDomain;
    }

    public void setExpiredTime(Date expiredTime)
    {
        this.expiredTime = expiredTime;
    }

    public Date getExpiredTime()
    {
        return expiredTime;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public String getStsId() {
        return stsId;
    }

    public void setStsId(String stsId) {
        this.stsId = stsId;
    }

    public String getStsName() {
        return stsName;
    }

    public void setStsName(String stsName) {
        this.stsName = stsName;
    }

    public String getIsAutoSsl() {
        return isAutoSsl;
    }

    public void setIsAutoSsl(String isAutoSsl) {
        this.isAutoSsl = isAutoSsl;
    }

    public Long getSslApplyId() {
        return sslApplyId;
    }

    public void setSslApplyId(Long sslApplyId) {
        this.sslApplyId = sslApplyId;
    }

    public String getIsYzOver() {
        return isYzOver;
    }

    public void setIsYzOver(String isYzOver) {
        this.isYzOver = isYzOver;
    }

    public String getDeployStatus() {
        return deployStatus;
    }

    public void setDeployStatus(String deployStatus) {
        this.deployStatus = deployStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId()).append("stsId", getStsId()).append("deployStatus", getDeployStatus())
            .append("isUniversal", getIsUniversal()).append("stsName", getStsName())
            .append("issuingAuthority", getIssuingAuthority()).append("isAutoSsl", getIsAutoSsl())
            .append("certificateDomain", getCertificateDomain()).append("isYzOver", getIsYzOver())
            .append("createTime", getCreateTime()).append("sslApplyId", getSslApplyId())
            .append("expiredTime", getExpiredTime()).append("rrVal", getRrVal())
            .append("status", getStatus()).append("sslAuthInfo", getSslAuthInfo())
            .append("createBy", getCreateBy()).append("autoExpiredTime", getAutoExpiredTime())
            .append("updateBy", getUpdateBy()).append("privateKeyType", getPrivateKeyType())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
